History based compression systems achieve compression by replacing portions of the data with references to matching data that have already been read by the system. A match is encoded by a pair of numbers called a length-distance pair, where each of the next length characters is equal to the character exactly distance characters behind it in the uncompressed stream.
The system keeps track of some amount of the most recent data, such as the last 2 kilobytes (kB), 4 kB, or 32 kB. The structure in which this data is held is called a sliding window or a history table. The system needs to keep this data to look for matches, and to keep this data to interpret any identified matches.